package com.coda.mapper;

import com.coda.adminVo.user.UserInfoQueryVo;
import com.coda.annotation.AutoFill;
import com.coda.entity.UserInfo;
import com.coda.enumeration.OperationType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {
    /**
     * 条件分页查询用户列表
     * @param userInfoQueryVo
     * @return
     */
     Page<UserInfo> page(UserInfoQueryVo userInfoQueryVo);

    /**
     * 根据id修改用户状态
     * @param userInfo
     */
    @AutoFill(OperationType.UPDATE)
    @Update("update user_info set status = #{status} where id = #{id}")
    void updateStatus(UserInfo userInfo);
}
